package com.itheima.day14.CountDownLatch.test1;

import java.util.concurrent.CountDownLatch;

public class ChileThread3 extends Thread {
    private CountDownLatch countDownLatch;
    public ChileThread3(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }
    @Override
    public void run() {
        // 吃饺子
        for (int i = 1; i <= 20; i++) {
            System.out.println(Thread.currentThread().getName() + "在吃第" + i + "个饺子");
        }
        // 吃完了告诉妈妈
        System.out.println(Thread.currentThread().getName() + "吃完了饺子");
    }
}
